package main

import (
	"github.com/gin-gonic/gin"
	"zg3yk/api"
	"zg3yk/cmd/rabbitmq"
	"zg3yk/config"
	"zg3yk/inits"
	"zg3yk/pkg"
)

func main() {
	config.ViperDataFs()
	go pkg.Fartory("rabbit")
	inits.MysqlInit()
	inits.ExampleNewClient()
	rabbitmq.InitRabbitMq()
	router := gin.Default()

	api.LoadRouter(router)

	router.GET("/pingyk", func(c *gin.Context) {
		c.JSON(200, gin.H{
			"message": "pong",
		})
	})
	router.Run(":10002") // 监听并在 0.0.0.0:8080 上启动服务
}
